/*
 * @Description: 获取屏幕宽高
 * @Author: wlj
 * @Date: 2023-01-05 16:28:38
 * @LastEditors: wlj
 * @LastEditTime: 2023-01-05 16:30:43
 * @FilePath: \my-vite-app\src\hooks\useScreenWh.js
 */
export default function () {
  const screen = reactive({
    width: 0,
    height: 0
  })

  const getWH = () => {
    screen.width = document.documentElement.clientWidth
    screen.height = document.documentElement.clientHeight
  }

  return {
    screen,
    getWH
  }
}
